// pinia库重置（退出登录）
import  useUserStore  from '@/store/modules/user';
import useCommunityStore  from '@/store/modules/community';

export function resetStores() {
  // 获取所有需要重置的 Store
  const userStore = useUserStore();
  const communityStore = useCommunityStore();

  // 调用每个 Store 的 $reset() 方法
  userStore.$reset();
  communityStore.$reset();

  localStorage.removeItem("VUE3-TOKEN");
  localStorage.removeItem("VUE3-NAME");
  localStorage.removeItem("VUE3-USERID");
  localStorage.removeItem("VUE3-ROLEID");
}